package net.findkrypton.po;

import java.io.File;
import java.util.Date;

import net.findkrypton.enume.Level;

/**
 * 存档文件信息
 * <br /><br />
 * <b>作者:&nbsp;</b>张天文 <br />
 * <b>日期:&nbsp;</b>2020年3月27日 下午7:10:29<br />
 * @date
 */
public class SaveFile implements Comparable<SaveFile>{
	private File path;
	private Date editDate;
	private Level level;
	private int width,height;
	private int useTime;
	private int noFlag;
	
	public SaveFile(Date editDate, int level, int width, int height, int useTime, int noFlag) {
		super();
		this.editDate = editDate;
		this.level = Level.get(level);
		this.width = width;
		this.height = height;
		this.useTime = useTime;
		this.noFlag = noFlag;
	}

	@Override
	public int compareTo(SaveFile o) {
		return (int) (editDate.getTime()-o.editDate.getTime());
	}

	public Date getEditDate() {
		return editDate;
	}

	public void setEditDate(Date editDate) {
		this.editDate = editDate;
	}

	public Level getLevel() {
		return level;
	}

	public void setLevel(Level level) {
		this.level = level;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getUseTime() {
		return useTime;
	}

	public void setUseTime(int useTime) {
		this.useTime = useTime;
	}

	public int getNoFlag() {
		return noFlag;
	}

	public void setNoFlag(int noFlag) {
		this.noFlag = noFlag;
	}

	public File getPath() {
		return path;
	}

	public void setPath(File path) {
		this.path = path;
	}

	@Override
	public String toString() {
		return "SaveFile [path=" + path + ", editDate=" + editDate + ", level=" + level + ", width=" + width
				+ ", height=" + height + ", useTime=" + useTime + ", noFlag=" + noFlag + "]";
	}
}
